<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorate="~{theme/default/layout}">

<head>
    <title th:text="${#servletContext.getAttribute('configMap')['blog_name']} + ' | 归档'"></title>
</head>
<body>
<div layout:fragment="content">
    <!-- 图片 -->
    <div class="image-banner" style="color: #fff">
        <div class="image-content"><img th:src="@{${prefix} + '/source/images/archive.png'}" class="magic img-responsive" ></div>
        <div class="descr"><a th:href="@{/}">首页</a>  /  <a href="javascript:void(0)">归档</a></div>
        <div class="title">归档</div>
    </div>

    <div class="ml-content">
        <div class="archive-body" id="archives">
            <div th:if="${pageInfo.total > 0}">
                <div class='archive-content' th:each="map,iterStat : ${pageInfo.data}">
                    <h3 class="animate-box" data-animate-effect="fadeInUp">[[${map.key}]]</h3>
                    <div class='archives'>
                        <div class="animate-box" data-animate-effect="fadeInUp" th:each="vo,iterStat2 : ${map.value}">
                            <a th:href="@{'/'+${vo.link}}"><span class="time">[[${vo.month} + '-' + ${vo.day}]]</span>[[${vo.title}]]</a>
                        </div>
                    </div>
                </div>

            </div>
            <div class='archive-title' th:if="${pageInfo.total == 0}">
                <div style="text-align:center;">
                    ~~暂无数据~~
                </div>
            </div>
        </div>
        <nav class="pagination-bar animate-box" data-animate-effect="fadeInUp" th:if="${#maps.isEmpty(pageInfo.data) eq false}">
        <span th:if="${pageInfo.hasPreviousPage}">
            <a class="prev page-numbers" th:href="@{${pageInfo.pageNum-1} == 1 ? '/archives/' : '/archives/page/' + ${pageInfo.pageNum-1}+'/'}" ><i class="fa fa-angle-left"></i></a>
        </span>
            <span th:if="${pageInfo.hasPreviousPage == false}">
            <a class="prev page-numbers" href="javascript:void(0)" ><i class="fa fa-angle-left"></i></a>
        </span>
            <span th:each="pageNum : ${pageInfo.navigatepageNums}">
            <span th:if="${pageNum == pageInfo.pageNum}">
                <a href="javascript:void(0)" th:text="${pageNum}" class="page-numbers current"></a>
            </span>
            <span th:if="${pageNum != pageInfo.pageNum}">
                <a th:href="@{${pageNum} == 1 ? '/archives/' : '/archives/page/' + ${pageNum}+'/'}" th:text="${pageNum}" class="page-numbers hidden-xs"></a>
            </span>
        </span>
            <span th:if="${pageInfo.hasNextPage}">
            <a class="next page-numbers" th:href="@{'/archives/page/' + ${pageInfo.pageNum+1}+'/'}" ><i class="fa fa-angle-right"></i></a>
        </span>
            <span th:if="${pageInfo.hasNextPage == false}">
            <a class="next page-numbers" href="javascript:void(0)" ><i class="fa fa-angle-right"></i></a>
        </span>
        </nav>
    </div>

</div>
</body>
</html>